<div id="sidebar">
	<div id="search">
		$SearchForm
	</div>
	<% if $IsMemberArea || $URLSegment == 'Security' || $URLSegment == 'admin/login' %>
		<% if $ClassName == 'ErrorPage' || $URLSegment == 'Security' || $URLSegment == 'admin/login' %>
			<% if $CurrentMember %>
				<% with $MemberArea %>
		  			<ul>
		            	<% include SidebarMenu %>
		            </ul>
		        <% end_with %>
	        <% end_if %>
    	<% else %>
	  		<% with $Level(1) %>
	  			<ul>
	            	<% include SidebarMenu %>
	            </ul>
	        <% end_with %>
        <% end_if %>
    <% else_if $Menu(2) %>
		<ul>
			<li class="$ClassName submenu active open">
				<a href="$Link" title="Go to the $Title.XML page">
					<span>$MenuTitle.XML</span>
					<i class="arrow fa fa-chevron-right"></i>
				</a>
				<ul>
					<% if $Children %>
						<% include SidebarMenu %>
					<% end_if %>
				</ul>
			</li>
		</ul>
    <% end_if %>
</div>